package com.byxx.gtz.devicemonitoringsysejb.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * DeviceSchemeDetail entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "DEVICE_SCHEME_DETAIL", schema = "DEVICE_FSX")

public class DeviceSchemeDetail implements java.io.Serializable {

	// Fields

	private String deviceId;
	private DeviceScheme deviceScheme;
	private int deviceRunning;
	private String deviceStatus;

	// Constructors

	/** default constructor */
	public DeviceSchemeDetail() {
	}

	/** minimal constructor */
	public DeviceSchemeDetail(String deviceId) {
		this.deviceId = deviceId;
	}

	/** full constructor */
	public DeviceSchemeDetail(String deviceId, DeviceScheme deviceScheme, int deviceRunning, String deviceStatus) {
		this.deviceId = deviceId;
		this.deviceScheme = deviceScheme;
		this.deviceRunning = deviceRunning;
		this.deviceStatus = deviceStatus;
	}

	// Property accessors
	@Id

	@Column(name = "DEVICE_ID", unique = true, nullable = false, length = 36)

	public String getDeviceId() {
		return this.deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "SCHEME_ID")

	public DeviceScheme getDeviceScheme() {
		return this.deviceScheme;
	}

	public void setDeviceScheme(DeviceScheme deviceScheme) {
		this.deviceScheme = deviceScheme;
	}

	@Column(name = "DEVICE_RUNNING", precision = 38, scale = 0)

	public int getDeviceRunning() {
		return this.deviceRunning;
	}

	public void setDeviceRunning(int deviceRunning) {
		this.deviceRunning = deviceRunning;
	}

	@Column(name = "DEVICE_STATUS", length = 100)

	public String getDeviceStatus() {
		return this.deviceStatus;
	}

	public void setDeviceStatus(String deviceStatus) {
		this.deviceStatus = deviceStatus;
	}

}